import { EquipmentToolTipData } from "../../../resource/info/EquipmentToolTipData";
import { ItemsUtil } from "../../shortcuts/item/ItemsUtil";
import { Language } from "../../../../../extend/language/Language";
import { Cache } from "../../../cache/Cache";
import { SuitConfig } from "../../../resource/SuitConfig";
import { ECategory } from "../../../../../Message/Public/ECategory";
import { SuitInfo } from "../../../resource/info/SuitInfo";
import { ItemData } from "../../../resource/info/ItemData";
import { HTMLUtil } from "../../../../../com/gengine/utils/HTMLUtil";
import { EquipmentItemDataUtil } from "../EquipmentItemDataUtil";
import { RolePlayer } from "../../../scene/player/entity/RolePlayer";
import { EEntityAttribute } from "../../../../../Message/Public/EEntityAttribute";
import { ItemConfig } from "../../../resource/ItemConfig";
import { EEquip } from "../../../../../Message/Public/EEquip";
import { EPlayerItemPosType } from "../../../../../Message/Public/EPlayerItemPosType";
import { WuXingConfig } from "../../../resource/WuXingConfig";
import { TEquipShenglingConfig } from "../../../../../Message/Db/Tables/TEquipShenglingConfig";
import { TItemWeapon } from "../../../../../Message/Db/Tables/TItemWeapon";
import { ColorConfig } from "../../../resource/ColorConfig";
import { ObjCreate } from "../ObjCreate";
import { GTextFormat } from "../../../../common/GTextFormat";
import { FontUtil } from "../../../../common/font/FontUtil";
import { EffectManager } from "../../../manager/EffectManager";
import { EBind } from "../../../../../Message/Public/EBind";
import { ImagesConst } from "../../../resource/ImagesConst";
import { GameDefConfig } from "../../../resource/GameDefConfig";
import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { BaseItem } from "../BaseItem";
import { StatueUserPlayer } from "../../../scene/player/entity/StatueUserPlayer";
import { DirectionType } from "../../../scene/modle/data/DirectionType";
import { ObjectPool } from "../../../../../com/gengine/utils/pools/ObjectPool";
import { SWFPlayer } from "../../../scene/modle/SWFPlayer";
import { ModelType } from "../../../scene/modle/data/ModelType";
import { CareerType } from "../../../scene/player/entity/CareerType";
import { SWFModelConfig } from "../../../resource/SWFModelConfig";
import { DisplayUtil } from "../../../../common/DisplayUtil";
import { LoaderHelp } from "../../../../common/display/LoaderHelp";
import { EquipmentUtil } from "../util/EquipmentUtil";
import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { GLabel } from "../../../../../com/mui/controls/GLabel";
import { SpecialRewardItemConfig } from "../../../resource/SpecialRewardItemConfig";
import { DateParser } from "../../../../common/tools/DateParser";
import { FashionJewelEquipToolTipsPart } from "../../fashionBox/fashionJewel/FashionJewelEquipToolTipsPart";
import { ParamsConst } from "../../../../common/global/ParamsConst";
import { ProxyType } from "../../../../common/global/ProxyType";
import { ESex } from "../../../../../Message/Public/ESex";
import { CareerUtil } from "../util/CareerUtil";
import { EJewel } from "../../../../../Message/Public/EJewel";
import { WuXingCache } from "../../../cache/WuXingCache";
import { EColor } from "../../../../../Message/Public/EColor";
import { SPlayerItem } from "../../../../../Message/Public/SPlayerItem";
import { ELimitType } from "../../../../../Message/Public/ELimitType";
import { EquimentContrastUtil } from "../EquimentContrastUtil";
import { GTextFiled } from "../../../../../com/mui/controls/GTextFiled";
import { TItem } from "../../../../../Message/Db/Tables/TItem";
import { ItemExInfo } from "../../../resource/info/ItemExInfo";
import { ColorInfo } from "../../../resource/info/ColorInfo";
import { LineBox } from "../../guide/LineBox";
type int = number;
//class EquipmentTooltip
    
    export  class EquipmentTooltip /* flash.display.Sprite */
    {
        constructor(arg1: EquipmentToolTipData)
        {
            
            this._eqItems = [];
            this._weapDict = new Map<any, any> /* flash.utils.Dictionary */();
            if (arg1) 
            {
                this.initData(arg1);
                this.init();
            }
            return;
        }

        public getSuitText(): string
        {
            var loc12=false;
            var loc13=0;
            var loc16=null;
            var loc17=null;
            var loc18=0;
            var loc19=0;
            var loc20=null;
            var loc21=0;
            var loc22=null;
            var loc23=0;
            var loc24=null;
            var loc25=null;
            var loc1="";
            if (ItemsUtil.isFashion(this._eqData.itemData) || ItemsUtil.isWing(this._eqData.itemData) || ItemsUtil.isFootPrint(this._eqData.itemData)) 
            {
                return "";
            }
            if (!this._eqData.isShowSuitAttr) 
            {
                return "";
            }
            if (ItemsUtil.isSpiritEquipHD(this._eqData.itemData)) 
            {
                loc1 = loc1 + (Language.getString(36649) + "\r");
                loc1 = loc1 + Cache.instance.spiritEquip.getSuitEatedTipByItemData(this._eqData.itemData);
                if (loc1 != "") 
                {
                    loc1 = "<textFormat leading=\'5\'>" + loc1 + "</textFormat>";
                }
                return loc1;
            }
            var loc2="";
            var loc3=[];
            var loc4=[];
            var loc5="";
            var loc6=[];
            var loc7="";
            var loc8="";
            var loc9=0;
            var loc10=0;
            var loc11=new Map<any, any> /* flash.utils.Dictionary */();
            var loc14="";
            var loc15=Cache.instance.role.entityInfo.career;
            if (this._tItemWeap) 
            {
                if (this._tItemWeap.suit != 0) 
                {
                    if (loc16 = SuitConfig.instance.getInfoByCode(this._tItemWeap.suit)) 
                    {
                        if (this._tItemWeap.category == ECategory._ECategorySpiritEquip) 
                        {
                            loc17 = new SuitInfo(loc16, loc15, true);
                        }
                        else 
                        {
                            loc17 = new SuitInfo(loc16);
                        }
                        loc10 = loc17.num;
                        loc3 = loc17.partList;
                        loc4 = loc17.partIdList;
                        loc18 = 0;
                        while (loc18 < this._eqItems.length) 
                        {
                            if ((loc22 = this._eqItems[loc18] as ItemData) && loc22.itemInfo && loc22.itemInfo.extend) 
                            {
                                if (loc22.itemInfo.extend.hasOwnProperty("suit")) 
                                {
                                    if (loc17.code == loc22.itemInfo.extend.suit) 
                                    {
                                        if (!loc11[loc22.itemCode]) 
                                        {
                                            ++loc9;
                                        }
                                        loc11[loc22.itemCode] = loc22;
                                        loc23 = 0;
                                        while (loc23 < loc3.length) 
                                        {
                                            if (loc22.itemInfo.extend.name == loc3[loc23] || loc22.itemInfo.extend.type == loc4[loc23]) 
                                            {
                                                loc6.push(loc23);
                                            }
                                            ++loc23;
                                        }
                                    }
                                }
                            }
                            ++loc18;
                        }
                        loc19 = 0;
                        while (loc19 < loc3.length) 
                        {
                            loc24 = "";
                            loc25 = "";
                            if (loc19 == 3) 
                            {
                                loc24 = "\r";
                            }
                            if (loc19 == 0 || loc19 == 4) 
                            {
                                loc25 = "    ";
                            }
                            if (loc6.indexOf(loc19) == -1) 
                            {
                                loc5 = loc5 + (loc25 + HTMLUtil.addColor(loc3[loc19], "#7c7c7c") + "  " + loc24);
                            }
                            else 
                            {
                                loc5 = loc5 + (loc25 + HTMLUtil.addColor(loc3[loc19], "#00ff00") + "  " + loc24);
                            }
                            ++loc19;
                        }
                        loc9 = loc9 > loc16.num ? loc16.num : loc9;
                        loc2 = HTMLUtil.addColor(loc16.name + "（" + loc9 + "/" + loc16.num + "）", this._colorInfo.color);
                        if (loc16.canLock && loc9 >= loc16.num && this._tItemWeap.color >= 4) 
                        {
                            loc12 = true;
                        }
                        if (loc12) 
                        {
                            loc14 = Language.getString(36102);
                        }
                        else 
                        {
                            loc14 = Language.getString(36103);
                        }
                        loc2 = loc2 + ("  " + loc14);
                        loc21 = 1;
                        while (loc21 <= loc10) 
                        {
                            if ((loc20 = loc17.addAttrArray[(loc21 - 1)]) != "") 
                            {
                                if (loc21 <= loc9) 
                                {
                                    loc7 = loc7 + HTMLUtil.addColor("    （" + loc21 + "）" + loc20 + "\r", "#f0ea3f");
                                }
                                else 
                                {
                                    loc7 = loc7 + HTMLUtil.addColor("    （" + loc21 + "）" + loc20 + "\r", "#7c7c7c");
                                }
                            }
                            ++loc21;
                        }
                        loc8 = loc16.attrSkill;
                        loc1 = loc2 + "\r" + loc5 + "\r" + loc7;
                    }
                }
            }
            if (loc1 != "") 
            {
                loc1 = "<textFormat leading=\'5\'>" + loc1 + "</textFormat>";
            }
            return loc1;
        }

        public set data(arg1: EquipmentToolTipData)
        {
            this.clear();
            this.initData(arg1);
            this.init();
            return;
        }

        public /* override */ get width(): number
        {
            if (this._isWing && this._itemData.itemCode == 10134026 || this._isBubble || this._isFootPrint || this._isElf) 
            {
                return 210;
            }
            return super.width + 10;
        }

        public /* override */ get height(): number
        {
            if (this._isFootPrint || this._isElf) 
            {
                return this._currentY + 10;
            }
            return super.height;
        }

        /* internal  */cloneDic(arg1: Map<any, any> /* flash.utils.Dictionary */): Map<any, any> /* flash.utils.Dictionary */
        {
            var loc2=undefined;
            var loc1=new Map<any, any> /* flash.utils.Dictionary */();
            var loc3=0;
            var loc4=arg1;
            for (loc2 in loc4) 
            {
                loc1[loc2] = arg1[loc2];
            }
            return loc1;
        }

        /* internal  */initData(arg1: EquipmentToolTipData): void
        {
            var loc1=null;
            var loc2=0;
            var loc3=null;
            var loc4=null;
            if (arg1) 
            {
                this._eqData = arg1;
                this._isContrast = arg1.isContrast;
                this._itemData = arg1.itemData;
                this._eqDataUtil = new EquipmentItemDataUtil(this._itemData);
                this._eqItems = arg1.equipmentsOnPlayer;
                this._addObj = arg1.additionalInfo;
                this._strengthen = 0;
                this._isFashion = ItemsUtil.isFashion(this._itemData);
                this._isFootPrint = ItemsUtil.isFootPrint(this._itemData);
                this._isBubble = ItemsUtil.isBubble(this._itemData);
                this._isSurround = ItemsUtil.isSurround(this._itemData);
                this._isFashionWeapon = ItemsUtil.isFashionWeapon(this._itemData);
                this._isWing = ItemsUtil.isWing(this._itemData);
                this._isWaistBelt = ItemsUtil.isWaistBelt(this._itemData);
                this._isElf = ItemsUtil.isElf(this._itemData);
                this._isHarmMedal = ItemsUtil.isHarmMedalDeeper(this._itemData) || ItemsUtil.isHarmMedalLower(this._itemData);
                this._isSpiritEquip = ItemsUtil.isSpiritEquip(this._itemData);
                if (this._isHarmMedal) 
                {
                    this._eqData.isShowAddAttr = false;
                    this._eqData.isShowInlayAttr = false;
                }
                if (this._isFashion || this._isWing || this._isFootPrint || this._isBubble || this._isSurround || this._isWaistBelt || this._isElf) 
                {
                    this._weapDict = this.cloneDic(RolePlayer.instance.equipsDic);
                    var loc5=0;
                    var loc6=this._weapDict;
                    for (loc3 in loc6) 
                    {
                        loc2 = int(loc3);
                        if (loc2 == EEntityAttribute._EAttributeClothes) 
                        {
                            continue;
                        }
                        delete this._weapDict[loc3];
                    }
                    if ((loc4 = ItemConfig.instance.getInfoByCode(this._weapDict[EEntityAttribute._EAttributeClothes])) && loc4.extend) 
                    {
                        if (loc4.type == EEquip._EEquipModel) 
                        {
                            this._weapDict[EEntityAttribute._EAttributeClothes] = 0;
                        }
                    }
                    if (this._isFootPrint) 
                    {
                        if (this._itemData.itemExInfo && this._itemData.posType == EPlayerItemPosType._EPlayerItemPosTypeRole) 
                        {
                            this._weapDict[EEntityAttribute._EAttributeFootprint] = this._itemData.itemExInfo.footprintModel;
                            this._descItemCode = this._itemData.itemExInfo.footprintModel;
                        }
                        else 
                        {
                            this._weapDict[EEntityAttribute._EAttributeFootprint] = this._itemData.itemCode;
                            this._descItemCode = this._itemData.itemCode;
                        }
                    }
                    if (this._isSurround) 
                    {
                        if (this._itemData.itemExInfo && this._itemData.posType == EPlayerItemPosType._EPlayerItemPosTypeRole) 
                        {
                            this._weapDict[EEntityAttribute._EAttributeSurround] = this._itemData.itemExInfo.SUModel;
                            this._descItemCode = this._itemData.itemExInfo.SUModel;
                        }
                        else 
                        {
                            this._weapDict[EEntityAttribute._EAttributeSurround] = this._itemData.itemCode;
                            this._descItemCode = this._itemData.itemCode;
                        }
                    }
                    if (this._isWaistBelt) 
                    {
                        if (this._itemData.itemExInfo && this._itemData.posType == EPlayerItemPosType._EPlayerItemPosTypeRole) 
                        {
                            this._weapDict[EEntityAttribute._EAttributeWaistBelt] = this._itemData.itemExInfo.WBModel;
                            this._descItemCode = this._itemData.itemExInfo.WBModel;
                        }
                        else 
                        {
                            this._weapDict[EEntityAttribute._EAttributeWaistBelt] = this._itemData.itemCode;
                            this._descItemCode = this._itemData.itemCode;
                        }
                    }
                    if (this._isBubble) 
                    {
                        if (this._itemData.itemExInfo && this._itemData.posType == EPlayerItemPosType._EPlayerItemPosTypeRole) 
                        {
                            this._weapDict[EEntityAttribute._EAttributeBubble] = this._itemData.itemExInfo.bubbleModel;
                            this._descItemCode = this._itemData.itemExInfo.bubbleModel;
                        }
                        else 
                        {
                            this._weapDict[EEntityAttribute._EAttributeBubble] = this._itemData.itemCode;
                            this._descItemCode = this._itemData.itemCode;
                        }
                    }
                    if (this._isFashion) 
                    {
                        if (this._isFashionWeapon) 
                        {
                            if (this._itemData.itemExInfo && this._itemData.posType == EPlayerItemPosType._EPlayerItemPosTypeRole) 
                            {
                                this._weapDict[EEntityAttribute._EAttributeWeapon] = this._itemData.itemExInfo.weaponfashionModel;
                                this._descItemCode = this._itemData.itemExInfo.weaponfashionModel;
                            }
                            else 
                            {
                                this._weapDict[EEntityAttribute._EAttributeWeapon] = this._itemData.itemCode;
                                this._descItemCode = this._itemData.itemCode;
                            }
                        }
                        else if (this._itemData.itemExInfo && this._itemData.posType == EPlayerItemPosType._EPlayerItemPosTypeRole) 
                        {
                            this._weapDict[EEntityAttribute._EAttributeClothes] = this._itemData.itemExInfo.fashionModel;
                            this._descItemCode = this._itemData.itemExInfo.fashionModel;
                        }
                        else 
                        {
                            this._weapDict[EEntityAttribute._EAttributeClothes] = this._itemData.itemCode;
                            this._descItemCode = this._itemData.itemCode;
                        }
                    }
                    if (this._isWing) 
                    {
                        if (this._itemData.itemExInfo) 
                        {
                            this._weapDict[EEntityAttribute._EAttributeWing] = this._itemData.itemExInfo.windModel;
                            this._descItemCode = this._itemData.itemExInfo.windModel;
                        }
                        else 
                        {
                            this._weapDict[EEntityAttribute._EAttributeWing] = this._itemData.itemCode;
                            this._descItemCode = this._itemData.itemCode;
                        }
                    }
                    if (this._isElf) 
                    {
                        if (this._itemData.itemExInfo) 
                        {
                            this._weapDict[EEntityAttribute._EAttributeElf] = this._itemData.itemExInfo.ELFModel;
                            this._descItemCode = this._itemData.itemExInfo.ELFModel;
                        }
                        else 
                        {
                            this._weapDict[EEntityAttribute._EAttributeElf] = this._itemData.itemCode;
                            this._descItemCode = this._itemData.itemCode;
                        }
                    }
                }
                else 
                {
                    this._descItemCode = this._itemData.itemCode;
                }
                loc1 = null;
                if (this._itemData) 
                {
                    this._uid = this._itemData.uid;
                    loc1 = this._itemData.itemInfo;
                    this._itemExInfo = this._itemData.itemExInfo;
                    this._wxEnergy = this._itemData.wxEnergy;
                    this._wxLevel = this._itemData.wxLevel;
                    this._wxColor = this._itemData.wxColor;
                    this._wxshenglingFight = (WuXingConfig.instance.getShengLingDetailInfo(this._itemData.wxShenglingLV) as TEquipShenglingConfig).addTotal;
                    this._wxIgnorDefence = (WuXingConfig.instance.getShengLingDetailInfo(this._itemData.wxShenglingLV) as TEquipShenglingConfig).ignoreRelief;
                    if (this._itemExInfo) 
                    {
                        this._score = this._itemExInfo.score;
                        if (this._itemExInfo.hole1 == 0 && this._itemExInfo.hole2 == 0 && this._itemExInfo.hole3 == 0 && this._itemExInfo.hole4 == 0 && this._itemExInfo.hole5 == 0 && this._itemExInfo.hole6 == 0) 
                        {
                            this._hasGem = false;
                            this._isHasHole = false;
                        }
                        else 
                        {
                            if (this._itemExInfo.hole1 <= 1 && this._itemExInfo.hole2 <= 1 && this._itemExInfo.hole3 <= 1 && this._itemExInfo.hole4 <= 1 && this._itemExInfo.hole5 <= 1 && this._itemExInfo.hole6 <= 1) 
                            {
                                this._isHasInlay = false;
                            }
                            else 
                            {
                                this._isHasInlay = true;
                            }
                            this._isHasHole = true;
                            this._hasGem = true;
                        }
                        if (this._itemExInfo.hole1 >= 1 && this._itemExInfo.hole2 >= 1 && this._itemExInfo.hole3 >= 1 && this._itemExInfo.hole4 >= 1 && this._itemExInfo.hole5 >= 1 && this._itemExInfo.hole6 >= 1) 
                        {
                            this._isCanHole = false;
                        }
                        else 
                        {
                            this._isCanHole = true;
                        }
                        this._prefix = this._itemExInfo.prefix;
                        if (this._itemData.category == ECategory._ECategorySpiritEquip) 
                        {
                            this._strengthen = this._itemExInfo.sp_eq_str;
                        }
                        else 
                        {
                            this._strengthen = this._itemExInfo.strengthen;
                        }
                    }
                    if (loc1) 
                    {
                        this._tItem = loc1.item;
                        this._eqColor = this._tItem.color;
                        if (loc1.extend && loc1.extend is TItemWeapon) 
                        {
                            this._tItemWeap = loc1.extend as TItemWeapon;
                        }
                        this._colorInfo = ColorConfig.instance.getItem("item", this._tItemWeap.color.toString());
                    }
                }
            }
            return;
        }

        /* internal  */clear(): void
        {
            if (this._gemSprite && this.contains(this._gemSprite)) 
            {
                this.removeChild(this._gemSprite);
            }
            this._itemData = null;
            this._tItem = null;
            this._tItemWeap = null;
            this._itemExInfo = null;
            this._hasGem = false;
            this._eqItems = [];
            this._prefix = 0;
            this._currentY = 0;
            this._gemY = 0;
            this._sY = 0;
            this._needY = 0;
            this._isContrast = false;
            this._eqData = null;
            this._addObj = null;
            return;
        }

        /* internal  */init(): void
        {
            var loc4=null;
            var loc10=null;
            var loc11=null;
            var loc12=null;
            var loc13=0;
            var loc14=0;
            var loc15=null;
            var loc16=null;
            var loc17=null;
            var loc18=null;
            var loc19=0;
            var loc20=NaN;
            var loc21=null;
            var loc22=0;
            var loc23=null;
            this.mouseChildren = false;
            loc10 = this.getQualityName();
            if (this._qualityTxt == null) 
            {
                this._qualityTxt = ObjCreate.createTextField("", this._leftX - 5, 0, 60, 20, this, new GTextFormat(FontUtil.songtiName, 14, null, false));
                this._qualityTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
            }
            if (!this.contains(this._qualityTxt)) 
            {
                this.addChild(this._qualityTxt);
            }
            this._qualityTxt.htmlText = loc10;
            if (this._eqData.isShowQualityFilter) 
            {
                if (!this._qualityLineBox) 
                {
                    this._qualityLineBox = EffectManager.getLineBox(this._qualityTxt.width, this._qualityTxt.height, [15788607]);
                }
                this._qualityLineBox.x = this._qualityTxt.x;
                this._qualityLineBox.y = this._qualityTxt.y;
                if (!this.contains(this._qualityLineBox)) 
                {
                    this.addChild(this._qualityLineBox);
                }
            }
            else if (this._qualityLineBox && this.contains(this._qualityLineBox)) 
            {
                this.removeChild(this._qualityLineBox);
            }
            if (!this._nameTxt) 
            {
                this._nameTxt = ObjCreate.createTextField("", 45 + this._leftX, 0, 220, 20, this, new GTextFormat(FontUtil.songtiName, 14, null, true));
                this._nameTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
            }
            this._nameTxt.text = this.getNameText();
            this._currentY = this._currentY + this._nameTxt.height;
            var loc1=this.getBind();
            if (loc1 != EBind._EBindYes) 
            {
                if (this._lockBitmap) 
                {
                    this._lockBitmap.visible = false;
                }
            }
            else 
            {
                if (this._lockBitmap == null) 
                {
                    this._lockBitmap = ObjCreate.createBitmap(ImagesConst.EqBind, this._leftX, this._currentY + 2, this);
                }
                this._lockBitmap.visible = true;
            }
            if (this._bindTxt == null) 
            {
                this._bindTxt = ObjCreate.createTextField("", 25, this._currentY, 80, 20, this, new GTextFormat(FontUtil.songtiName, 12, 65280));
                this._bindTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
            }
            if (this._lockBitmap && this._lockBitmap.visible == true) 
            {
                this._bindTxt.x = 25;
            }
            else 
            {
                this._bindTxt.x = 7;
            }
            this._bindTxt.text = GameDefConfig.instance.getEBind(loc1).name;
            if (this._itemExInfo && this._itemData.color >= 4 && this._isFashion == false && this._isWing == false && this._isFootPrint == false && this._isBubble == false && this._isSurround == false && this._isWaistBelt == false && this._isElf == false && !(this._tItem.type == EEquip._EEquipHeartLock)) 
            {
                if (this._scoreTxt == null) 
                {
                    this._scoreTxt = ObjCreate.createTextField("", 70, this._currentY, 80, 20, this, new GTextFormat(FontUtil.songtiName, 12, 16742658));
                    this._scoreTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
                }
                if (this._score != 0) 
                {
                    this._scoreStr = this._score.toString();
                }
                else 
                {
                    this._scoreStr = Language.getString(51111);
                }
                this._scoreTxt.text = Language.getString(51112) + this._scoreStr;
                this._scoreTxt.visible = true;
                if (this._score == -1 || this._isHarmMedal || this._isSpiritEquip) 
                {
                    this._scoreTxt.visible = false;
                }
            }
            else if (this._scoreTxt) 
            {
                this._scoreTxt.visible = false;
            }
            if (this._needLevelTxt == null) 
            {
                this._needLevelTxt = ObjCreate.createTextField("", 70, this._currentY + 17, 100, 20, this, new GTextFormat(FontUtil.songtiName, 12, 16777215));
                this._needLevelTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
            }
            this._needLevelTxt.htmlText = this.getNeedLevelStr();
            this._currentY = this._currentY + (this._needLevelTxt.height + 5);
            if (this._imageBg == null) 
            {
                this._imageBg = GlobalClass.getBitmap(ImagesConst.PackItemBg);
                this.addChild(this._imageBg);
            }
            this._imageBg.width = 38;
            this._imageBg.height = 38;
            this._imageBg.x = 10;
            this._imageBg.y = this._currentY;
            if (!this._eqItem) 
            {
                this._eqItem = new BaseItem();
                this._eqItem.setSize(32, 32);
                this.addChild(this._eqItem);
            }
            this._eqItem.itemData = this._itemData;
            this._eqItem.amount = -1;
            this._eqItem.move(13, this._currentY + 3);
            this._needY = this._currentY;
            if (this._eqTypeTxt == null) 
            {
                this._eqTypeTxt = ObjCreate.createTextField("", 70, this._currentY + 12, 100, 20, this, new GTextFormat(FontUtil.songtiName, 12, 16777215));
                this._eqTypeTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
            }
            if (!this._isSpiritEquip) 
            {
                this._eqTypeTxt.text = this.getEqType();
            }
            if (this._creerText == null) 
            {
                this._creerText = ObjCreate.createTextField("", 135, this._currentY + 12, 100, 20, this, new GTextFormat(FontUtil.songtiName, 12, 16678144));
                this._creerText.autoSize = flash.text.TextFieldAutoSize.LEFT;
            }
            if (this._tItemWeap.category != ECategory._ECategorySpiritEquip) 
            {
                this._creerText.htmlText = this.getNeedCareerName();
            }
            else 
            {
                this._creerText.htmlText = "";
            }
            if (this._durabTxt == null) 
            {
                this._durabTxt = ObjCreate.createTextField("", 70, this._currentY + 28, 100, 20, this, new GTextFormat(FontUtil.songtiName, 12, 16777215));
                this._durabTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
            }
            if (this._tItemWeap.category != ECategory._ECategorySpiritEquip) 
            {
                this._durabTxt.htmlText = this.getDurab();
            }
            else 
            {
                this._durabTxt.htmlText = "";
            }
            this._currentY = this._currentY + (this._imageBg.height + 5);
            if (this._isFashion || this._isWing || this._isSurround || this._isWaistBelt) 
            {
                if (this._userModel != null) 
                {
                    this._userModel.dispose(false);
                }
                else 
                {
                    this._userModel = new StatueUserPlayer();
                }
                this._userModel.direction = DirectionType.South;
                this._userModel.camp = Cache.instance.role.entityInfo.camp;
                this._userModel.sex = Cache.instance.role.entityInfo.sex;
                this._userModel.career = Cache.instance.role.entityInfo.careerEnable;
                this._userModel.reserveJs.wingStrPerLv = this._strengthen;
                this._userModel.updateEquipByDic(this._weapDict);
                this._userModel.x = 90;
                this._userModel.y = this._currentY + 110;
                if (!this.contains(this._userModel)) 
                {
                    this.addChild(this._userModel);
                }
                this._currentY = this._currentY + 130;
            }
            else if (this._userModel && this.contains(this._userModel)) 
            {
                this._userModel.dispose();
            }
            if (this._isFootPrint || this._isElf) 
            {
                loc11 = ItemConfig.instance.getInfoByCode(this._itemData.itemCode).modelId;
                loc12 = ItemConfig.instance.getInfoByCode(this._itemData.itemCode);
                if (!this._moduleSwf) 
                {
                    this._moduleSwf = ObjectPool.getObject(SWFPlayer);
                }
                this._moduleSwf.timeRate = 8;
                if (this._isFootPrint) 
                {
                    this._moduleSwf.load(loc11 + ".swf", ModelType.NormalSwf, loc12);
                    this._moduleSwf.sceneX = 105;
                    this._moduleSwf.sceneY = this._currentY + 35;
                }
                else if (this._isElf) 
                {
                    loc13 = CareerType.getCareer(Cache.instance.role.careerBasic);
                    loc14 = Cache.instance.role.entityInfo.sex;
                    loc15 = SWFModelConfig.instance.getInfoByCode(loc11, loc14, loc13);
                    this._moduleSwf.load(loc15, ModelType.Elf, loc12);
                    this._moduleSwf.sceneX = 170;
                    this._moduleSwf.sceneY = this._currentY + 160;
                }
                if (this.contains(this._moduleSwf) == false) 
                {
                    this.addChild(this._moduleSwf);
                }
                this._currentY = this._currentY + 70;
            }
            else if (this._moduleSwf && this.contains(this._moduleSwf)) 
            {
                this._moduleSwf.clear();
                this._moduleSwf.dispose();
                DisplayUtil.removeMe(this._moduleSwf);
                ObjectPool.disposeObject(this._moduleSwf, SWFPlayer);
            }
            if (this._isBubble) 
            {
                if (!this._bubbleImg) 
                {
                    this._bubbleImg = new Object /* flash.display.Bitmap */();
                    this._bubbleImg.x = -20;
                    this._bubbleImg.y = this._currentY - 3;
                }
                if ((loc16 = ItemConfig.instance.getInfoByCode(this._weapDict[EEntityAttribute._EAttributeBubble]).modelId) && !(loc16 == "")) 
                {
                    LoaderHelp.setBitmapdata(loc16 + "_0.png", this._bubbleImg);
                }
                if (this.contains(this._bubbleImg) == false) 
                {
                    this.addChild(this._bubbleImg);
                }
                this._currentY = this._currentY + 113;
            }
            else 
            {
                DisplayUtil.removeMe(this._bubbleImg);
            }
            if (!this._basicPropTxt) 
            {
                this._basicPropTxt = ObjCreate.createTextField("", this._leftX, this._currentY, 100, 20, this, new GTextFormat(FontUtil.songtiName, 12, 16777215));
                this._basicPropTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
            }
            this._basicPropTxt.htmlText = this.getBasicProps();
            this._basicPropTxt.y = this._currentY;
            this._currentY = this._currentY + this._basicPropTxt.height;
            if (this._baseLine == null) 
            {
                this._baseLine = ObjCreate.createBg(0, this._currentY, this._lineWidth, 1, this, ImagesConst.SeptalLine);
            }
            this._baseLine.y = this._currentY;
            this._currentY = this._currentY + this._baseLine.height;
            var loc2=this.getAddtionalProps();
            if (!(loc2 == "") && !this._isSpiritEquip) 
            {
                if (!this._addtionalPropTxt) 
                {
                    this._addtionalPropTxt = ObjCreate.createTextField("", this._leftX, this._currentY, 100, 20);
                    this._addtionalPropTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
                }
                if (!this.contains(this._addtionalPropTxt)) 
                {
                    this.addChild(this._addtionalPropTxt);
                }
                this._addtionalPropTxt.htmlText = loc2;
                this._addtionalPropTxt.y = this._currentY;
                this._currentY = this._currentY + this._addtionalPropTxt.height;
                if (this._addLine == null) 
                {
                    this._addLine = ObjCreate.createBg(0, this._currentY, this._lineWidth, 1, null, ImagesConst.SeptalLine);
                }
                if (!this.addChild(this._addLine)) 
                {
                    this.addChild(this._addLine);
                }
                this._addLine.y = this._currentY;
                this._currentY = this._currentY + this._addLine.height;
            }
            else 
            {
                if (this._addtionalPropTxt && this.contains(this._addtionalPropTxt)) 
                {
                    this.removeChild(this._addtionalPropTxt);
                }
                if (this._addLine && this.contains(this._addLine)) 
                {
                    this.removeChild(this._addLine);
                }
            }
            if (this._isFashion == false && this._isWing == false && this._isFootPrint == false && this._isBubble == false && this._isSurround == false && this._isWaistBelt == false && this._isElf == false) 
            {
                if (!((loc17 = this.getInlay()) == "") && !this._isSpiritEquip) 
                {
                    if (this._gemTxt == null) 
                    {
                        this._gemTxt = ObjCreate.createTextField(Language.getString(51085), this._leftX, this._currentY, 100, 20, this, new GTextFormat(FontUtil.songtiName, 12, 16678144));
                        this._gemTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
                    }
                    if (!this.contains(this._gemTxt)) 
                    {
                        this.addChild(this._gemTxt);
                    }
                    this._gemTxt.htmlText = loc17;
                    this._gemTxt.y = this._currentY;
                    this._currentY = this._currentY + this._gemTxt.height;
                    this._gemY = this._currentY;
                    this._hasGem = true;
                    if (this._hasGem) 
                    {
                        this._gemSprite = this.getGemSprit();
                        this._gemSprite.x = this._leftX;
                        this._gemSprite.y = this._gemY;
                        if (!this.contains(this._gemSprite)) 
                        {
                            this.addChild(this._gemSprite);
                        }
                        this._currentY = this._currentY + this._sY;
                    }
                    else if (this._gemSprite && this.contains(this._gemSprite)) 
                    {
                        this.removeChild(this._gemSprite);
                    }
                    if (this._gemLine == null) 
                    {
                        this._gemLine = ObjCreate.createBg(0, this._currentY, this._lineWidth, 1, this, ImagesConst.SeptalLine);
                    }
                    this._gemLine.y = this._currentY;
                    this._currentY = this._currentY + this._gemLine.height;
                }
                else 
                {
                    if (this._gemTxt && this.contains(this._gemTxt)) 
                    {
                        this.removeChild(this._gemTxt);
                    }
                    if (this._gemSprite && this.contains(this._gemSprite)) 
                    {
                        this.removeChild(this._gemSprite);
                    }
                    if (this._gemLine && this.contains(this._gemLine)) 
                    {
                        this.removeChild(this._gemLine);
                    }
                }
            }
            else 
            {
                if (this._gemTxt && this.contains(this._gemTxt)) 
                {
                    this.removeChild(this._gemTxt);
                }
                if (this._gemSprite && this.contains(this._gemSprite)) 
                {
                    this.removeChild(this._gemSprite);
                }
                if (this._gemLine && this.contains(this._gemLine)) 
                {
                    this.removeChild(this._gemLine);
                }
            }
            if (ItemsUtil.isFashionBoxEquip(this._itemData)) 
            {
                if (this._eqData.fashionJewelInfoArr.length > 0 || this._itemData.posType == EPlayerItemPosType._EPlayerItemPosTypeRole && Cache.instance.role.entityInfo.level >= 90 || EquipmentUtil.isHaveFashionJewelChatInfo(this._itemExInfo, this._itemData.type)) 
                {
                    if (this._eqData.fashionJewelInfoArr.length > 0 && this._eqData.roleLv >= 90) 
                    {
                        this.addFashionJewel();
                        this._fashionJewelSp.tooltipData = this._eqData.fashionJewelInfoArr;
                    }
                    else if (EquipmentUtil.isHaveFashionJewelChatInfo(this._itemExInfo, this._itemData.type)) 
                    {
                        this.addFashionJewel();
                        this._fashionJewelSp.tooltipData = EquipmentUtil.getFshionJewelChatInfo(this._itemExInfo, this._itemData.type);
                    }
                    else if (this._itemData.posType != EPlayerItemPosType._EPlayerItemPosTypeRole) 
                    {
                        this.removeFashionJewel();
                    }
                    else 
                    {
                        this.addFashionJewel();
                        this._fashionJewelSp.tooltipData = Cache.instance.wardrobe.getSelfFashionJewelInfoArr(Cache.instance.role.careerBasic, this._itemData.type);
                    }
                }
                else 
                {
                    this.removeFashionJewel();
                }
            }
            else 
            {
                this.removeFashionJewel();
            }
            var loc3="";
            loc3 = this.getSuitText();
            if (loc3 == "") 
            {
                if (this._suitTxt && this.contains(this._suitTxt)) 
                {
                    this.removeChild(this._suitTxt);
                }
                if (this._suitLine && this.contains(this._suitLine)) 
                {
                    this.removeChild(this._suitLine);
                }
            }
            else 
            {
                if (this._suitTxt == null) 
                {
                    this._suitTxt = ObjCreate.createTextField("", this._leftX, this._currentY, 200, 20);
                    this._suitTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
                    this._suitTxt.multiline = true;
                    this._suitTxt.wordWrap = true;
                }
                if (!this.contains(this._suitTxt)) 
                {
                    this.addChild(this._suitTxt);
                }
                this._suitTxt.htmlText = loc3;
                this._suitTxt.y = this._currentY;
                this._currentY = this._currentY + this._suitTxt.height;
                if (this._suitLine == null) 
                {
                    this._suitLine = ObjCreate.createBg(0, this._currentY, this._lineWidth, 1, null, ImagesConst.SeptalLine);
                }
                if (!this.contains(this._suitLine)) 
                {
                    this.addChild(this._suitLine);
                }
                this._suitLine.y = this._currentY;
                this._currentY = this._currentY + this._suitLine.height;
            }
            if (this._wxEnergy > 0 && this._tItemWeap.level >= 70) 
            {
                if ((loc4 = this.getWxEnergyStr()) == "") 
                {
                    if (this._wxEnergyTxt && this.contains(this._wxEnergyTxt)) 
                    {
                        this.removeChild(this._wxEnergyTxt);
                    }
                    if (this._wxEnergyLine && this.contains(this._wxEnergyLine)) 
                    {
                        this.removeChild(this._wxEnergyLine);
                    }
                }
                else 
                {
                    if (this._wxEnergyTxt == null) 
                    {
                        this._wxEnergyTxt = ObjCreate.createTextField("", this._leftX, this._currentY, 100, 20);
                        this._wxEnergyTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
                    }
                    if (!this.contains(this._wxEnergyTxt)) 
                    {
                        this.addChild(this._wxEnergyTxt);
                    }
                    this._wxEnergyTxt.htmlText = loc4;
                    this._wxEnergyTxt.y = this._currentY;
                    this._currentY = this._currentY + this._wxEnergyTxt.height;
                    if (this._wxEnergyLine == null) 
                    {
                        this._wxEnergyLine = ObjCreate.createBg(0, this._currentY, this._lineWidth, 1, null, ImagesConst.SeptalLine);
                    }
                    if (!this.contains(this._wxEnergyLine)) 
                    {
                        this.addChild(this._wxEnergyLine);
                    }
                    this._wxEnergyLine.y = this._currentY;
                    this._currentY = this._currentY + this._wxEnergyLine.height;
                }
            }
            else 
            {
                if (this._wxEnergyTxt && this.contains(this._wxEnergyTxt)) 
                {
                    this.removeChild(this._wxEnergyTxt);
                }
                if (this._wxEnergyLine && this.contains(this._wxEnergyLine)) 
                {
                    this.removeChild(this._wxEnergyLine);
                }
            }
            var loc5;
            if ((loc5 = this.getHideText()) == "") 
            {
                if (this._hideTxt && this.contains(this._hideTxt)) 
                {
                    this.removeChild(this._hideTxt);
                }
            }
            else 
            {
                if (this._hideTxt == null) 
                {
                    this._hideTxt = ObjCreate.createTextField("", this._leftX, this._currentY, 100, 20);
                    this._hideTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
                }
                if (!this.contains(this._hideTxt)) 
                {
                    this.addChild(this._hideTxt);
                }
                this._hideTxt.y = this._currentY;
                this._currentY = this._currentY + this._hideTxt.height;
            }
            if (this._eqData.isHidedAttr() && !this._isHarmMedal) 
            {
                if (!this._hideTipBg) 
                {
                    this._hideTipBg = ObjCreate.createBg(this._leftX, this._currentY, 120, 30, null, ImagesConst.SelectedBg);
                }
                if (!this._hidedTipTxt) 
                {
                    this._hidedTipTxt = ObjCreate.createGTextField("", this._leftX, this._currentY, 100, 20, null, GlobalStyle.textFormat6);
                    this._hidedTipTxt.autoSize = flash.text.TextFieldAutoSize.CENTER;
                    this._hidedTipTxt.htmlText = Language.getString(51133);
                }
                this._hidedTipTxt.y = this._currentY + 5;
                this._hideTipBg.y = this._hidedTipTxt.y;
                this._currentY = this._currentY + (this._hidedTipTxt.height + 10);
                if (!this.contains(this._hideTipBg)) 
                {
                    this.addChild(this._hideTipBg);
                }
                if (!this.contains(this._hidedTipTxt)) 
                {
                    this.addChild(this._hidedTipTxt);
                }
            }
            else 
            {
                if (this._hideTipBg && this.contains(this._hideTipBg)) 
                {
                    this.removeChild(this._hideTipBg);
                }
                if (this._hidedTipTxt && this.contains(this._hidedTipTxt)) 
                {
                    this.removeChild(this._hidedTipTxt);
                }
            }
            var loc6;
            if ((loc6 = this.getEqDescText()) == "") 
            {
                if (this._eqDescTxt && this.contains(this._eqDescTxt)) 
                {
                    this.removeChild(this._eqDescTxt);
                }
            }
            else 
            {
                if (!this._eqDescTxt) 
                {
                    this._eqDescTxt = ObjCreate.createTextField("", this._leftX, this._currentY, 185, 20, null, new GTextFormat(FontUtil.songtiName, 12, 16777215));
                    this._eqDescTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
                    this._eqDescTxt.wordWrap = true;
                    this._eqDescTxt.multiline = true;
                }
                if (!this.contains(this._eqDescTxt)) 
                {
                    this.addChild(this._eqDescTxt);
                }
                this._eqDescTxt.htmlText = loc6;
                this._eqDescTxt.y = this._currentY;
                this._currentY = this._currentY + this._eqDescTxt.height;
            }
            var loc7;
            if ((loc7 = this.getRepairDescText()) == "") 
            {
                if (this._repairTxt && this.contains(this._repairTxt)) 
                {
                    this.removeChild(this._repairTxt);
                }
            }
            else 
            {
                if (!this._repairTxt) 
                {
                    this._repairTxt = ObjCreate.createTextField("", this._leftX, this._currentY, 200, 20, null, new GTextFormat(FontUtil.songtiName, 12, 16777215));
                    this._repairTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
                }
                if (!this.contains(this._repairTxt)) 
                {
                    this.addChild(this._repairTxt);
                }
                this._repairTxt.htmlText = loc7;
                this._repairTxt.y = this._currentY;
                this._currentY = this._currentY + this._repairTxt.height;
            }
            var loc8;
            if ((loc8 = this.getSellToSysText()) == "") 
            {
                if (this._sellToSysTxt && this.contains(this._sellToSysTxt)) 
                {
                    this.removeChild(this._sellToSysTxt);
                }
            }
            else 
            {
                if (!this._sellToSysTxt) 
                {
                    this._sellToSysTxt = ObjCreate.createTextField("", this._leftX, this._currentY, 200, 20, null, new GTextFormat(FontUtil.songtiName, 12, 15319853));
                    this._sellToSysTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
                }
                if (!this.contains(this._sellToSysTxt)) 
                {
                    this.addChild(this._sellToSysTxt);
                }
                this._sellToSysTxt.htmlText = loc8;
                this._sellToSysTxt.y = this._currentY;
                this._currentY = this._currentY + this._sellToSysTxt.height;
            }
            if (!this._sendToChatTxt) 
            {
                this._sendToChatTxt = ObjCreate.createTextField("", this._leftX, this._currentY, 200, 20, this, new GTextFormat(FontUtil.songtiName, 12, 16777215));
                this._sendToChatTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
                this._sendToChatTxt.text = Language.getString(51086);
            }
            this._sendToChatTxt.y = this._currentY;
            this._currentY = this._currentY + this._sendToChatTxt.height;
            var loc9;
            if ((loc9 = this.getTip()) == "") 
            {
                if (this._tipTxt && this.contains(this._tipTxt)) 
                {
                    this.removeChild(this._tipTxt);
                }
            }
            else 
            {
                if (this._tipTxt == null) 
                {
                    this._tipTxt = ObjCreate.createTextField("", this._leftX, this._currentY, 200, 20, null, new GTextFormat(FontUtil.songtiName, 12, 51429));
                    this._tipTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
                }
                if (!this.contains(this._tipTxt)) 
                {
                    this.addChild(this._tipTxt);
                }
                if (this._tItemWeap.category == ECategory._ECategorySpiritEquip) 
                {
                    this._tipTxt.text = "";
                }
                else 
                {
                    this._tipTxt.text = loc9;
                }
                this._tipTxt.y = this._currentY;
                this._currentY = this._currentY + this._tipTxt.height;
            }
            if (this._addObj && this._addObj is String && !(this._addObj == "")) 
            {
                if (!this._addLabel) 
                {
                    this._addLabel = new GLabel();
                }
                if (!this.contains(this._addLabel)) 
                {
                    this.addChild(this._addLabel);
                }
                this._addLabel.textField.autoSize = flash.text.TextFieldAutoSize.LEFT;
                this._addLabel.htmlText = this._addObj.toString();
                this._addLabel.drawNow();
                this._addLabel.y = 0;
                this._addLabel.move(this._leftX, this._currentY);
                this._currentY = this._currentY + this._addLabel.textField.height;
            }
            else if (this._addLabel && this.contains(this._addLabel)) 
            {
                this.removeChild(this._addLabel);
            }
            if (this._isFashion || this._isHarmMedal) 
            {
                loc18 = "";
                loc19 = -1;
                loc20 = 0;
                if (loc23 = SpecialRewardItemConfig.instance.getInfoByCode(this._itemData.itemCode)) 
                {
                    loc21 = loc23.effectDay;
                }
                if (this._itemExInfo) 
                {
                    if (this._isFashion) 
                    {
                        loc19 = int(this._itemExInfo.fashEffDay);
                    }
                    else if (this._isHarmMedal) 
                    {
                        loc19 = int(this._itemExInfo.medalEffDay);
                    }
                    loc20 = loc19 * 24 * 3600 * 1000;
                    if (!loc21 || loc21.time > loc20) 
                    {
                        loc21 = new Date(loc20);
                    }
                }
                if (loc21) 
                {
                    loc22 = loc21.fullYear;
                }
                if (loc22 != 0) 
                {
                    if (loc22 > 0 && loc22 < 2016) 
                    {
                        loc18 = Language.getString(51087) + DateParser.parse(loc21, Language.getString(51088));
                    }
                    else 
                    {
                        loc18 = Language.getString(51089);
                    }
                }
                else 
                {
                    loc18 = "";
                }
                if (loc18 == "") 
                {
                    if (this._fashionDayTxt && this.contains(this._fashionDayTxt)) 
                    {
                        this.removeChild(this._fashionDayTxt);
                    }
                }
                else 
                {
                    if (this._fashionDayTxt == null) 
                    {
                        this._fashionDayTxt = ObjCreate.createTextField("", this._leftX, this._currentY, 220, 20, this, GlobalStyle.textFormat6);
                    }
                    if (!this.contains(this._fashionDayTxt)) 
                    {
                        this.addChild(this._fashionDayTxt);
                    }
                    this._fashionDayTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
                    this._fashionDayTxt.text = loc18;
                    this._fashionDayTxt.y = this._currentY;
                    this._currentY = this._currentY + this._fashionDayTxt.textHeight;
                }
            }
            else if (this._fashionDayTxt && this.contains(this._fashionDayTxt)) 
            {
                this.removeChild(this._fashionDayTxt);
            }
            if (EquipmentTooltip.isShowGas) 
            {
                if (this._addGasTxt == null) 
                {
                    this._addGasTxt = ObjCreate.createTextField("", 9, this._currentY, 150, 20, this, GlobalStyle.textFormat6);
                    this._addGasTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
                }
                this._addGasTxt.text = Language.getStringByParam(35991, this._itemData.gasValue);
            }
            else if (this._addGasTxt && this.contains(this._addGasTxt)) 
            {
                this.removeChild(this._addGasTxt);
            }
            if (this._eqData.isContrast) 
            {
                if (this._baseSprite && this.contains(this._baseSprite)) 
                {
                    this.removeChild(this._baseSprite);
                }
                if (this._annexSprite && this.contains(this._annexSprite)) 
                {
                    this.removeChild(this._annexSprite);
                }
                if (this._basicPropTxt) 
                {
                    this._baseSprite = this.getContrastInfo();
                    if (this._baseSprite) 
                    {
                        this.addChild(this._baseSprite);
                    }
                }
            }
            if (this._equippedBitmap && this.contains(this._equippedBitmap)) 
            {
                this.removeChild(this._equippedBitmap);
            }
            if (this._eqData.isShowEquipped) 
            {
                if (this._equippedBitmap == null) 
                {
                    this._equippedBitmap = GlobalClass.getBitmap(ImagesConst.Equipped);
                }
                this._equippedBitmap.y = -10;
                if (this._equippedBitmap && !this.contains(this._equippedBitmap)) 
                {
                    this._equippedBitmap.x = 120;
                    this.addChildAt(this._equippedBitmap, 0);
                }
            }
            if (this._equipOwnedBmp && this.contains(this._equipOwnedBmp)) 
            {
                this.removeChild(this._equipOwnedBmp);
            }
            if (this.itemData.category == ECategory._ECategoryEquip && (this.itemData.type == EEquip._EEquipFashion || this.itemData.type == EEquip._EEquipFashionWeapon || this.itemData.type == EEquip._EEquipFootPrint || this.itemData.type == EEquip._EEquipWing || this.itemData.type == EEquip._EEquipBubble || this.itemData.type == EEquip._EEquipSurround || this.itemData.type == EEquip._EEquipWaistBelt || this.itemData.type == EEquip._EEquipElf || this.itemData.type == EEquip._EEquipHeartLock)) 
            {
                if (this._eqData.showOwnEquip > 0) 
                {
                    if (this._equipOwnedBmp == null) 
                    {
                        this._equipOwnedBmp = new Object /* flash.display.Bitmap */();
                        this._equipOwnedBmp.x = 120;
                        this._equipOwnedBmp.y = -10;
                    }
                    if (this._eqData.showOwnEquip != 1) 
                    {
                        if (this._eqData.showOwnEquip == 2) 
                        {
                            this._equipOwnedBmp.bitmapData = GlobalClass.getBitmapData(ImagesConst.EquipNotOwned);
                        }
                    }
                    else 
                    {
                        this._equipOwnedBmp.bitmapData = GlobalClass.getBitmapData(ImagesConst.EquipOwned);
                    }
                    if (this._equipOwnedBmp && !this.contains(this._equipOwnedBmp)) 
                    {
                        this.addChildAt(this._equipOwnedBmp, 0);
                    }
                }
            }
            if (this._hidedTipTxt) 
            {
                this._hidedTipTxt.x = (super.width - this._hidedTipTxt.width) / 2;
                this._hideTipBg.x = this._hidedTipTxt.x - 10;
            }
            return;
        }

        /* internal  */addFashionJewel(): void
        {
            if (this._fashionJewelSp == null) 
            {
                this._fashionJewelSp = new FashionJewelEquipToolTipsPart();
            }
            if (!this.contains(this._fashionJewelSp)) 
            {
                this.addChild(this._fashionJewelSp);
            }
            this._fashionJewelSp.y = this._currentY;
            this._currentY = this._currentY + 178;
            if (this._fashionJewelSptLine == null) 
            {
                this._fashionJewelSptLine = ObjCreate.createBg(0, this._currentY, this._lineWidth, 1, null, ImagesConst.SeptalLine);
            }
            if (!this.contains(this._fashionJewelSptLine)) 
            {
                this.addChild(this._fashionJewelSptLine);
            }
            this._fashionJewelSptLine.y = this._currentY;
            this._currentY = this._currentY + this._fashionJewelSptLine.height;
            return;
        }

        /* internal  */removeFashionJewel(): void
        {
            if (this._fashionJewelSp && this.contains(this._fashionJewelSp)) 
            {
                this.removeChild(this._fashionJewelSp);
            }
            if (this._fashionJewelSptLine && this.contains(this._fashionJewelSptLine)) 
            {
                this.removeChild(this._fashionJewelSptLine);
            }
            return;
        }

        /* internal  */getQualityName(): string
        {
            var loc2=null;
            var loc3=null;
            var loc4=null;
            var loc1="";
            if (this._itemExInfo) 
            {
                if (this._tItemWeap.color > 2 || this._tItemWeap.type == EEquip._EEquipHeartLock) 
                {
                    loc3 = GameDefConfig.instance.getEPrefixx(this._prefix, this._itemData.type);
                    if (loc3) 
                    {
                        loc2 = loc3.name;
                    }
                    loc4 = ColorConfig.instance.getItemColorString(this._tItemWeap.color);
                    loc1 = HTMLUtil.addColor("[" + loc2 + "]", loc4);
                }
            }
            return loc1;
        }

        public getNameText(): string
        {
            var loc3=null;
            var loc1="";
            var loc2="";
            if (ItemsUtil.isWing(this._itemData) && this._itemData.posType == EPlayerItemPosType._EPlayerItemPosTypeRole) 
            {
                if (this._eqData.flyLv > 0 && this._eqData.roleLv >= 90) 
                {
                    loc2 = loc2 + Language.getStringByParam(69640, this._eqData.flyLv);
                }
                else if (this._eqData.flyLv != -1) 
                {
                    if (this._itemExInfo && this._itemExInfo.fly_Lv > 0) 
                    {
                        loc2 = loc2 + Language.getStringByParam(69640, this._itemExInfo.fly_Lv);
                    }
                    else if (this._itemExInfo && this._itemExInfo.fly_Lv == -1) 
                    {
                        loc2 = "";
                    }
                    else if (Cache.instance.role.entityInfo.level >= 90 && Cache.instance.wardrobe.flyWingInfo.flyLevel > 0) 
                    {
                        loc2 = loc2 + Language.getStringByParam(69640, Cache.instance.wardrobe.flyWingInfo.flyLevel);
                    }
                }
                else 
                {
                    loc2 = "";
                }
            }
            if (this._tItemWeap) 
            {
                loc2 = loc2 + (" " + this._itemData.name);
            }
            if (this._strengthen > 0) 
            {
                loc2 = loc2 + (" +" + this._strengthen);
            }
            loc1 = loc2;
            this._nameTxt.textColor = this._colorInfo.intColor;
            if (ParamsConst.instance.proxyType == ProxyType.TW && !(ParamsConst.instance.gameName == null)) 
            {
                if (loc1.indexOf(ParamsConst.instance.gameName) >= 0) 
                {
                    loc3 = new RegExp(ParamsConst.instance.gameName, "g");
                    loc1 = loc1.replace(loc3, "");
                }
            }
            return loc1;
        }

        /* internal  */getStrengthen(): int
        {
            var loc1=0;
            if (this._itemExInfo && !(this._itemExInfo.strengthen == 0)) 
            {
                loc1 = this._itemExInfo.strengthen;
            }
            else if (this._itemExInfo && !(this._itemExInfo.sp_eq_str == 0)) 
            {
                loc1 = this._itemExInfo.sp_eq_str;
            }
            return loc1;
        }

        /* internal  */getBind(): int
        {
            var loc1=-1;
            if (this._tItemWeap) 
            {
                loc1 = this._tItemWeap.bind;
                if (this._itemExInfo && !(this._itemExInfo.bind == 0)) 
                {
                    loc1 = this._itemExInfo.bind;
                }
            }
            return loc1;
        }

        /* internal  */getNeedLevelStr(): string
        {
            var loc1=Language.getString(51090);
            var loc2="#ffffff";
            loc1 = loc1 + this._tItemWeap.level.toString();
            if (Cache.instance.role.entityInfo.level < this._tItemWeap.level) 
            {
                loc2 = "#ff0000";
            }
            return HTMLUtil.addColor(loc1, loc2);
        }

        /* internal  */getEqType(): string
        {
            var loc2=null;
            var loc1="";
            if (this._tItemWeap.type != 0) 
            {
                loc2 = GameDefConfig.instance.getEEquipDef(this._tItemWeap.type);
                if (loc2) 
                {
                    loc1 = loc2.name;
                }
            }
            else 
            {
                loc1 = GameDefConfig.instance.getEWeaponName(this._tItemWeap.careerSkillType);
            }
            return loc1;
        }

        /* internal  */getNeedCareerName(): string
        {
            var loc1="";
            var loc2="#fe7d00";
            if (this._isFashion != false) 
            {
                if (this._itemExInfo) 
                {
                    if (this._itemExInfo.fashSex != ESex._ESexMan) 
                    {
                        if (this._itemExInfo.fashSex == ESex._ESexWoman) 
                        {
                            loc1 = Language.getString(32077);
                        }
                    }
                    else 
                    {
                        loc1 = Language.getString(32076);
                    }
                    if (this._itemExInfo.fashSex != Cache.instance.role.entityInfo.sex) 
                    {
                        loc2 = "#ff0000";
                    }
                }
            }
            else if (this._tItemWeap) 
            {
                loc1 = this.getCareerName();
                if (!CareerUtil.isCareerSuit(this._tItemWeap.career, Cache.instance.role.roleInfo.career)) 
                {
                    loc2 = "#ff0000";
                }
            }
            if (loc1 != "") 
            {
                loc1 = HTMLUtil.addColor(loc1, loc2);
            }
            return loc1;
        }

        /* internal  */getDurab(): string
        {
            var loc1=Language.getString(51091);
            var loc2="#ffffff";
            if (this._itemExInfo) 
            {
                loc1 = loc1 + (this._itemExInfo.durable + "/" + this._tItemWeap.durableUpper);
                if (this._itemExInfo.durable == 0) 
                {
                    loc2 = "#ff0000";
                }
            }
            else 
            {
                loc1 = loc1 + (this._tItemWeap.durable + "/" + this._tItemWeap.durableUpper);
                if (this._tItemWeap.durable == 0) 
                {
                    loc2 = "#ff0000";
                }
            }
            return HTMLUtil.addColor(loc1, loc2);
        }

        public getCareerName(): string
        {
            var loc1="";
            var loc2=null;
            if (this._tItemWeap) 
            {
                loc1 = CareerUtil.getEquipCareerName(this._tItemWeap.career);
            }
            return loc1;
        }

        public getBasicProps(): string
        {
            var loc5=0;
            var loc6=null;
            var loc7=null;
            var loc8=0;
            var loc9=0;
            var loc10=null;
            var loc11=0;
            var loc12=0;
            var loc13=null;
            if (!this._eqData.isShowBaseAttr) 
            {
                return "";
            }
            var loc1="";
            var loc2=this._eqDataUtil.getBasePropArray();
            var loc3=this._eqData.baseAttrExtraArray;
            if (loc2.length > 0) 
            {
                loc1 = HTMLUtil.addColor(Language.getString(51092), "#fe7d00");
                loc5 = this.getStrengthen();
                if (!(this._tItem.type == EEquip._EEquipHeartLock) && loc5 == 0) 
                {
                    loc1 = loc1 + HTMLUtil.addColor(Language.getString(51093), "#7c7c7c");
                }
            }
            var loc4=0;
            while (loc4 < loc2.length) 
            {
                loc7 = (loc6 = loc2[loc4] as Map<any, any> /* flash.utils.Dictionary */)["name"];
                loc8 = loc6["value"];
                loc9 = loc6["type"];
                loc10 = "";
                loc11 = this._eqDataUtil.getBaseAdditive(loc8);
                loc12 = 0;
                loc13 = "";
                if (loc3 && loc3[loc4]) 
                {
                    loc12 = int(loc3[loc4]);
                }
                if (this._itemExInfo && (this._itemExInfo.strengthen > 0 || this._itemExInfo.sp_eq_str > 0)) 
                {
                    if (loc11 > 0) 
                    {
                        loc10 = "+" + loc11;
                    }
                    if (loc12 > 0) 
                    {
                        loc13 = HTMLUtil.addColor("+" + loc12, "#00ff00");
                    }
                }
                else 
                {
                    if (loc11 > 0) 
                    {
                        loc8 = loc8 + loc11;
                    }
                    if (loc12 > 0) 
                    {
                        loc13 = HTMLUtil.addColor("+" + loc12, "#00ff00");
                    }
                }
                if (loc7.length != 2) 
                {
                    if (loc9 == EJewel._EJewelHarmDeeper || loc9 == EJewel._EJewelHarmLower) 
                    {
                        loc1 = loc1 + ("\r    " + loc7 + "    " + loc8 + "%" + (loc10 == "" ? "" : loc10 + "%") + (loc13 == "" ? "" : loc13 + "%"));
                    }
                    else 
                    {
                        loc1 = loc1 + ("\r    " + loc7 + "    " + loc8 + loc10 + loc13);
                    }
                }
                else if (loc9 == EJewel._EJewelHarmDeeper || loc9 == EJewel._EJewelHarmLower) 
                {
                    loc1 = loc1 + ("\r    " + loc7 + "        " + loc8 + "%" + (loc10 == "" ? "" : loc10 + "%") + (loc13 == "" ? "" : loc13 + "%"));
                }
                else 
                {
                    loc1 = loc1 + ("\r    " + loc7 + "        " + loc8 + loc10 + loc13);
                }
                ++loc4;
            }
            if (loc1 != "") 
            {
                loc1 = "<textFormat leading=\'5\'>" + HTMLUtil.addColor(loc1, "#ffffff") + "</textFormat>";
            }
            return loc1;
        }

        public getAddtionalProps(): string
        {
            var loc3=0;
            var loc7=null;
            var loc8=null;
            var loc9=0;
            var loc10=0;
            var loc11=null;
            var loc12=0;
            var loc13=0;
            var loc14=null;
            var loc15=0;
            if (!this._eqData.isShowAddAttr) 
            {
                return "";
            }
            var loc1="";
            var loc2="";
            var loc4=false;
            var loc5;
            if ((loc5 = this._eqDataUtil.getAddtionalArray()).length == 0 && this._eqColor > 1) 
            {
                loc4 = true;
                loc2 = HTMLUtil.addColor(Language.getString(51094), "#7c7c7c");
            }
            if (this._eqColor > 1) 
            {
                loc1 = HTMLUtil.addColor(Language.getString(51095), "#fe7d00") + loc2;
            }
            var loc6=0;
            while (loc6 < loc5.length) 
            {
                loc7 = loc5[loc6] as Map<any, any> /* flash.utils.Dictionary */;
                if (!loc4) 
                {
                    loc8 = loc7["name"];
                    loc9 = loc7["value"];
                    loc10 = loc7["star"];
                    loc11 = "";
                    loc12 = loc9;
                    loc13 = 5 - loc12.toString().length;
                    loc14 = "";
                    loc15 = 0;
                    while (loc15 < loc13) 
                    {
                        loc14 = loc14 + " ";
                        ++loc15;
                    }
                    loc11 = loc14 + Language.getStringByParam(51096, loc10);
                    if (loc8.length != 2) 
                    {
                        loc1 = loc1 + ("\r    " + loc8 + "    " + loc12 + loc11);
                    }
                    else 
                    {
                        loc1 = loc1 + ("\r    " + loc8 + "        " + loc12 + loc11);
                    }
                }
                ++loc6;
            }
            if (loc1 != "") 
            {
                loc1 = "<textFormat leading=\'5\'>" + HTMLUtil.addColor(loc1, "#00ff00") + "</textFormat>";
            }
            if (this._tItem && this._tItem.type == EEquip._EEquipHeartLock) 
            {
                loc1 = "";
            }
            return loc1;
        }

        /* internal  */getInlay(): string
        {
            if (!this._eqData.isShowInlayAttr) 
            {
                return "";
            }
            var loc1=HTMLUtil.addColor(Language.getString(51097), "#fe7d00");
            if (this._isHasHole != false) 
            {
                if (this._isHasInlay == false) 
                {
                    loc1 = loc1 + HTMLUtil.addColor(Language.getString(51099), "#7c7c7c");
                }
            }
            else 
            {
                loc1 = loc1 + HTMLUtil.addColor(Language.getString(51098), "#7c7c7c");
            }
            if (this._tItem && this._tItem.type == EEquip._EEquipHeartLock) 
            {
                loc1 = "";
            }
            return loc1;
        }

        public getFashionSuitTx(): string
        {
            var loc4=null;
            var loc5=0;
            if (!this._eqData.isShowSuitAttr || !this._eqData) 
            {
                return "";
            }
            var loc1="";
            var loc2=(this._eqData.itemData.itemInfo.extend as TItemWeapon).suit;
            var loc3=SuitConfig.instance.getInfoByCode(loc2);
            if (loc3) 
            {
                loc4 = loc3.suitShow;
                loc5 = Cache.instance.wardrobe.getSuitOpenNum(loc2, false).openNum;
                loc1 = loc1 + ("<textFormat leading=\'4\'>" + HTMLUtil.addColor(loc3.name + " （ " + loc5 + " / 4 ）", GlobalStyle.yellow) + "\r");
                loc1 = loc1 + Cache.instance.wardrobe.getSuitWearingStr(loc2);
                loc1 = loc1 + (Cache.instance.wardrobe.getSuitOpeningData(loc2) + "</textFormat>" + "\r");
            }
            else 
            {
                loc1 = "";
            }
            return loc1;
        }

        /* internal  */getWxEnergyStr(): string
        {
            if (!this._eqData.isShowWuxingAttr) 
            {
                return "";
            }
            var loc1="";
            var loc2=this.getWxLevelColor(this._wxLevel);
            var loc3="";
            var loc4=ColorConfig.instance.getItemColorString(this._wxColor);
            var loc5=GameDefConfig.instance.getWuxingTileName(this._wxColor);
            var loc6="";
            var loc7="";
            var loc8="";
            if (this._tItemWeap.level < WuXingCache.SHENGLINGOPENLV) 
            {
                if (this._wxLevel < 10) 
                {
                    loc3 = Language.getString(51119);
                }
                if (this._wxColor < 5) 
                {
                    loc6 = Language.getString(51119);
                }
                loc1 = Language.getStringByParam(51118, this._wxEnergy, this._wxLevel, loc3, loc4, loc5, loc6);
            }
            else 
            {
                if (this._wxLevel < 10 || this._wxColor < 5) 
                {
                    loc3 = Language.getString(51119);
                }
                else 
                {
                    loc3 = "";
                }
                if (this._wxshenglingFight != 0) 
                {
                    loc7 = this._wxshenglingFight.toString();
                }
                else 
                {
                    loc7 = Language.getString(73009);
                }
                if (this._wxIgnorDefence != 0) 
                {
                    loc8 = this._wxIgnorDefence.toString();
                }
                else 
                {
                    loc8 = Language.getString(73010);
                }
                loc1 = Language.getStringByParam(73017, this._wxEnergy, loc4, loc5, this._wxLevel, loc3, loc7, loc8);
            }
            return loc1;
        }

        /* internal  */getWxLevelColor(arg1: int): string
        {
            var loc1="#ffffff";
            if (arg1 >= 3 && arg1 <= 4) 
            {
                loc1 = "#00ff00";
            }
            if (arg1 >= 5 && arg1 <= 6) 
            {
                loc1 = "#00BEFF";
            }
            if (arg1 >= 7 && arg1 <= 9) 
            {
                loc1 = "#FF00FF";
            }
            else if (arg1 >= 10) 
            {
                loc1 = "#FF7902";
            }
            return loc1;
        }

        public getGemSprit(): Object /* flash.display.Sprite */
        {
            var loc1=new Object /* flash.display.Sprite */();
            if (this._itemExInfo) 
            {
                this.addGemByHold(loc1, this._itemExInfo.hole1, 1);
                this.addGemByHold(loc1, this._itemExInfo.hole2, 2);
                this.addGemByHold(loc1, this._itemExInfo.hole3, 3);
                if (this._tItemWeap.level >= 60) 
                {
                    this.addGemByHold(loc1, this._itemExInfo.hole4, 4, true);
                    this.addGemByHold(loc1, this._itemExInfo.hole5, 5, true);
                }
                if (this._tItemWeap.color >= EColor._EColorRed) 
                {
                    this.addGemByHold(loc1, this._itemExInfo.hole6, 6, true);
                }
            }
            return loc1;
        }

        public addGemByHold(arg1: Object /* flash.display.Sprite */, arg2: int, arg3: int, arg4: Boolean=false): void
        {
            var loc1=null;
            var loc2=null;
            var loc6=null;
            var loc7=null;
            var loc8=null;
            var loc9=null;
            var loc3="";
            var loc4="";
            var loc5="";
            if (arg2 != 0) 
            {
                if (arg2 != 1) 
                {
                    if (arg2 > 1) 
                    {
                        (loc1 = GlobalClass.getBitmap("HoleBg")).y = this._sY;
                        arg1.addChild(loc1);
                        this._sY = this._sY + (loc1.height + 3);
                        loc2 = new BaseItem();
                        (loc7 = new SPlayerItem()).itemCode = arg2;
                        loc8 = new ItemData(loc7);
                        loc2.itemData = loc8;
                        if (loc8 && loc8.itemInfo && loc8.itemInfo.item) 
                        {
                            loc3 = loc8.itemInfo.item.name;
                            if (loc9 = GameDefConfig.instance.getEJewel(loc8.itemInfo.item.type)) 
                            {
                                loc4 = loc9.name;
                            }
                            loc5 = EquipmentUtil.jewelPropertyTips(loc8.itemInfo.item);
                        }
                        loc2.x = loc1.x;
                        loc2.y = loc1.y;
                        loc2.setSize(22, 22);
                        loc2.drawNow();
                        arg1.addChild(loc2);
                        (loc6 = new GLabel()).setStyle("textFormat", new GTextFormat(FontUtil.songtiName, 12, 41727));
                        if (loc8.itemInfo.item.itemLevel <= 8) 
                        {
                            loc6.text = loc3 + " " + loc4 + loc5;
                        }
                        else if (loc8.itemInfo.item.itemLevel == 9) 
                        {
                            loc6.text = loc3 + " " + loc5;
                        }
                        loc6.x = loc1.x + loc1.width + 2;
                        loc6.y = loc1.y + 2;
                        loc6.textField.autoSize = flash.text.TextFieldAutoSize.LEFT;
                        loc6.drawNow();
                        arg1.addChild(loc6);
                    }
                }
                else 
                {
                    (loc1 = GlobalClass.getBitmap("HoleBg")).y = this._sY;
                    arg1.addChild(loc1);
                    (loc6 = new GLabel()).setStyle("textFormat", new GTextFormat(FontUtil.songtiName, 12, 41727));
                    loc6.htmlText = HTMLUtil.addColor(Language.getString(51101), "#7c7c7c");
                    loc6.x = loc1.x + loc1.width + 2;
                    loc6.y = loc1.y + 2;
                    loc6.textField.autoSize = flash.text.TextFieldAutoSize.LEFT;
                    arg1.addChild(loc6);
                    this._sY = this._sY + (loc1.height + 3);
                }
            }
            else if (arg4) 
            {
                (loc1 = GlobalClass.getBitmap("HoleBg")).y = this._sY;
                arg1.addChild(loc1);
                ObjCreate.createBitmap(ImagesConst.HideHole, 3, this._sY + 3, arg1);
                (loc6 = new GLabel()).setStyle("textFormat", new GTextFormat(FontUtil.songtiName, 12, 41727));
                if (arg3 != 4) 
                {
                    if (arg3 != 5) 
                    {
                        if (arg3 == 6) 
                        {
                            loc6.htmlText = Language.getString(74101);
                        }
                    }
                    else 
                    {
                        loc6.htmlText = Language.getStringByParam(51100, "+7");
                    }
                }
                else 
                {
                    loc6.htmlText = Language.getStringByParam(51100, "+5");
                }
                loc6.x = loc1.x + loc1.width + 2;
                loc6.y = loc1.y + 2;
                loc6.textField.autoSize = flash.text.TextFieldAutoSize.LEFT;
                arg1.addChild(loc6);
                this._sY = this._sY + (loc1.height + 3);
            }
            return;
        }

        public getHideText(): string
        {
            var loc1="";
            return loc1;
        }

        public getEqDescText(): string
        {
            var loc2=null;
            var loc3=null;
            var loc1="";
            if (this._isFashion || this._isWing || this._isFootPrint || this._isBubble || this._isSurround || this._isWaistBelt || this._isElf) 
            {
                loc2 = ItemConfig.instance.getInfoByCode(this._descItemCode);
                if (loc2) 
                {
                    loc3 = loc2.item.descStr;
                    if (loc3) 
                    {
                        if (!(loc3 == "") && !(loc3 == "0")) 
                        {
                            loc1 = "<textFormat leading=\'5\'>" + HTMLUtil.addColor(Language.getString(51102) + loc3, "#ffffff") + "</textFormat>";
                        }
                    }
                }
            }
            else if (this._tItemWeap) 
            {
                if (!(this._tItemWeap.descStr == "") && !(this._tItemWeap.descStr == "0")) 
                {
                    loc1 = "<textFormat leading=\'5\'>" + HTMLUtil.addColor(Language.getString(51102) + this._tItemWeap.descStr, "#ffffff") + "</textFormat>";
                }
            }
            return loc1;
        }

        public getRepairDescText(): string
        {
            var loc3=null;
            var loc4=null;
            var loc1="";
            var loc2="";
            if (this._tItemWeap) 
            {
                if (this._tItemWeap.specialRepairNeedAmount != 0) 
                {
                    loc3 = "";
                    if ((loc4 = ItemConfig.instance.getInfoByCode(this._tItemWeap.specialRepairNeedItem)) && loc4.item) 
                    {
                        loc3 = loc4.item.name;
                    }
                    loc2 = Language.getString(51103) + this._tItemWeap.specialRepairNeedAmount + loc3;
                }
            }
            if (loc2 != "") 
            {
                loc1 = HTMLUtil.addColor(loc2, "#60e71e");
            }
            return loc1;
        }

        public getSellToSysText(): string
        {
            var loc3=null;
            var loc1="";
            var loc2="";
            if (this._tItemWeap) 
            {
                if (this._tItemWeap.sell == 1) 
                {
                    loc3 = GameDefConfig.instance.getEPrictUnitName(this._tItemWeap.sellUnit);
                    loc2 = this._tItemWeap.sellPrice + "\t" + loc3;
                }
            }
            if (loc2 != "") 
            {
                loc1 = Language.getString(51104) + loc2;
            }
            return loc1;
        }

        /* internal  */getTip(): string
        {
            var loc5=false;
            var loc6=false;
            var loc7=false;
            if (this._isHarmMedal) 
            {
                return "";
            }
            var loc1="";
            var loc2="";
            var loc3=this.getStrengthen();
            var loc4=this._eqDataUtil.getAddtionalArray();
            var loc8=ItemsUtil.isHeartLock(this._itemData);
            if (ItemsUtil.isCanForge(this._itemData, ELimitType.convert(ELimitType._ELimitNoStrengthen)) && loc3 < 10 && !loc8) 
            {
                loc5 = true;
            }
            if (ItemsUtil.isCanForge(this._itemData, ELimitType.convert(ELimitType._ELimitNoRefresh)) && loc4.length == 0 && !loc8) 
            {
                loc6 = true;
            }
            loc7 = this._isCanHole && !loc8 && !this._isFashion && !this._isWing && !this._isFootPrint && !this._isBubble && !this._isSurround && !this._isWaistBelt && !this._isElf;
            if (loc5 || loc6 || loc7) 
            {
                loc1 = Language.getString(51110);
                if (loc5) 
                {
                    loc2 = Language.getString(51105);
                }
                if (loc7) 
                {
                    if (loc2 == "") 
                    {
                        loc2 = loc2 + Language.getString(51107);
                    }
                    else 
                    {
                        loc2 = loc2 + Language.getString(51106);
                    }
                }
                if (loc6) 
                {
                    if (loc2 == "") 
                    {
                        loc2 = loc2 + Language.getString(51109);
                    }
                    else 
                    {
                        loc2 = loc2 + Language.getString(51108);
                    }
                }
                loc1 = loc1 + loc2;
            }
            return loc1;
        }

        /* internal  */getContrastInfo(arg1: Boolean=true): Object /* flash.display.Sprite */
        {
            var loc3=null;
            var loc4=0;
            var loc5=0;
            var loc6=0;
            var loc7=null;
            var loc8=null;
            var loc1=this._eqData.getSameDressingOn();
            var loc2=[];
            if (arg1) 
            {
                loc2 = EquimentContrastUtil.getContrastValueArray(loc1, this._itemData);
            }
            else 
            {
                loc2 = EquimentContrastUtil.getContrastValueArray(loc1, this._itemData, false);
            }
            if (loc2 && loc2.length > 0) 
            {
                loc3 = new Object /* flash.display.Sprite */();
                loc4 = 0;
                loc5 = 0;
                while (loc5 < loc2.length) 
                {
                    loc6 = loc2[loc5] as int;
                    loc7 = new Object /* flash.display.Bitmap */();
                    (loc8 = new GTextFiled()).autoSize = flash.text.TextFieldAutoSize.LEFT;
                    if (loc6 >= 0) 
                    {
                        loc7 = GlobalClass.getBitmap(ImagesConst.RangeRaise);
                        loc8.textColor = 65280;
                        if (loc6 == 0) 
                        {
                            loc7.visible = false;
                            loc8.visible = false;
                        }
                    }
                    else if (loc6 < 0) 
                    {
                        loc7 = GlobalClass.getBitmap(ImagesConst.RangeDecline);
                        loc8.textColor = 16711680;
                    }
                    loc7.width = 11;
                    loc7.height = 17;
                    loc4 = loc5 * 17 + 2;
                    loc7.y = loc4;
                    loc8.text = Math.abs(loc6).toString();
                    loc8.x = loc7.x + 11;
                    loc8.y = loc4;
                    loc3.addChild(loc7);
                    loc3.addChild(loc8);
                    ++loc5;
                }
                if (arg1) 
                {
                    loc3.y = this._basicPropTxt.y + 15;
                    this.addChild(loc3);
                    loc3.x = this._basicPropTxt.x + this._basicPropTxt.width + 5;
                }
                else 
                {
                    loc3.y = this._addtionalPropTxt.y + 15;
                    this.addChild(loc3);
                    loc3.x = this._addtionalPropTxt.x + this._addtionalPropTxt.width + 5;
                }
            }
            return loc3;
        }

        public get itemData(): ItemData
        {
            return this._itemData;
        }

        public set itemData(arg1: ItemData)
        {
            this._itemData = arg1;
            return;
        }

        public dispose(): void
        {
            this.clear();
            this._nameTxt = null;
            this._imageBg = null;
            this._eqItem = null;
            this._basicPropTxt = null;
            this._addtionalPropTxt = null;
            this._suitTxt = null;
            this._gemSprite = null;
            this._hideTxt = null;
            this._eqDescTxt = null;
            this._repairTxt = null;
            this._sellToSysTxt = null;
            this._sendToChatTxt = null;
            this._baseSprite = null;
            this._annexSprite = null;
            this._addLabel = null;
            return;
        }

        /* internal */ /* var */_userModel: StatueUserPlayer;

        /* internal */ /* var */_addGasTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_moduleSwf: SWFPlayer;

        /* internal */ /* var */_bubbleImg: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_fashionJewelSp: FashionJewelEquipToolTipsPart;

        /* internal */ /* var */_fashionJewelSptLine: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_itemData: ItemData;

        /* internal */ /* var */_tItem: TItem;

        /* internal */ /* var */_tItemWeap: TItemWeapon;

        /* internal */ /* var */_itemExInfo: ItemExInfo;

        /* internal */ /* var */_isHasHole: Boolean=false;

        /* internal */ /* var */_isCanHole: Boolean=true;

        /* internal */ /* var */_isHasInlay: Boolean=false;

        /* internal */ /* var */_hasGem: Boolean=false;

        /* internal */ /* var */_eqItems: Array<any>;

        /* internal */ /* var */_prefix: int=0;

        /* internal */ /* var */_isFashion: Boolean;

        /* internal */ /* var */_isFashionWeapon: Boolean;

        /* internal */ /* var */_isWing: Boolean;

        /* internal */ /* var */_isHarmMedal: Boolean;

        /* internal */ /* var */_descItemCode: int;

        /* internal */ /* var */_isFootPrint: Boolean;

        /* internal */ /* var */_isBubble: Boolean;

        /* internal */ /* var */_isSpiritEquip: Boolean;

        /* internal */ /* var */_addtionalPropTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_isWaistBelt: Boolean;

        /* internal */ /* var */_isElf: Boolean;

        /* internal */ /* var */_wxEnergy: int;

        /* internal */ /* var */_wxLevel: int;

        /* internal */ /* var */_wxColor: int;

        /* internal */ /* var */_wxshenglingFight: int;

        /* internal */ /* var */_wxIgnorDefence: int;

        /* internal */ /* var */_currentY: int;

        /* internal */ /* var */_gemY: int;

        /* internal */ /* var */_sY: int;

        /* internal */ /* var */_needY: int;

        /* internal */ /* var */_eqColor: int;

        /* internal */ /* var */_colorInfo: ColorInfo;

        /* internal */ /* var */_uid: string;

        /* internal */ /* var */_score: int;

        /* internal */ /* var */_scoreStr: string;

        /* internal */ /* var */_strengthen: int;

        /* internal */ /* var */_addObj: Object;

        /* internal */ /* var */_leftX: int=10;

        /* internal */ /* var */_lineWidth: int=185;

        /* internal */ /* var */_isContrast: Boolean;

        /* internal */ /* var */_eqData: EquipmentToolTipData;

        /* internal */ /* var */_eqDataUtil: EquipmentItemDataUtil;

        /* internal */ /* var */_weapDict: Map<any, any> /* flash.utils.Dictionary */;

        /* internal */ /* var */_qualityTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_qualityLineBox: LineBox;

        /* internal */ /* var */_nameTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_lockBitmap: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_bindTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_scoreTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_needLevelTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_imageBg: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_eqItem: BaseItem;

        /* internal */ /* var */_eqTypeTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_creerText: Object /* flash.text.TextField */;

        /* internal */ /* var */_durabTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_basicPropTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_baseLine: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_addLine: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_gemTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_gemSprite: Object /* flash.display.Sprite */;

        /* internal */ /* var */_gemLine: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_suitTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_suitLine: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_wxEnergyTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_wxEnergyLine: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_isSurround: Boolean;

        /* internal */ /* var */_hideTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_hidedTipTxt: GTextFiled;

        /* internal */ /* var */_hideTipBg: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_eqDescTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_repairTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_sellToSysTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_sendToChatTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_tipTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_addLabel: GLabel;

        /* internal */ /* var */_fashionDayTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_baseSprite: Object /* flash.display.Sprite */;

        /* internal */ /* var */_annexSprite: Object /* flash.display.Sprite */;

        /* internal */ /* var */_equippedBitmap: Object /* flash.display.Bitmap */;

        public static /* var */isShowGas: Boolean=false;

        /* internal */ /* var */_equipOwnedBmp: Object /* flash.display.Bitmap */;
    }

            EquipmentTooltip.isShowGas = false;
        